package com.mcx.modules.data.localdata.dbmodel;

import com.mcx.modules.data.localdata.create.SkillLevelDBModel;
import com.mcx.modules.data.localdata.create.SkillLevelEntity;

public class SkillLevelDBModelExt extends SkillLevelDBModel {
    private static SkillLevelDBModelExt instance;

    public static SkillLevelDBModelExt getInstance() {
        if (instance == null) {
            instance = new SkillLevelDBModelExt();
        }
        return instance;
    }
    /// <summary>
    /// 根据技能编号和技能等级扩展实体
    /// </summary>
    /// <param name="skillId"></param>
    /// <param name="skillLevel"></param>
    /// <returns></returns>
    public SkillLevelEntity GetEntityBySkillIdAndLevel(int skillId, int skillLevel)
    {
        for (int i = 0; i < m_List.size(); i++)
        {
            if (m_List.get(i).SkillId == skillId && m_List.get(i).Level == skillLevel)
            {
                return m_List.get(i);
            }
        }
        return null;
    }
}
